<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改金点子服务申请记录')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-apply-edit" th:object="${crServiceApplicationRecord}">
            <input name="applyId" th:field="*{applyId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户：</label>
                <div class="col-sm-8">
                    <select name="userId" class="form-control m-b" th:with="userList=${userList}">
                        <option th:each="user : ${userList}" th:text="${user.userName}" th:value="${user.userId}" th:field="*{userId}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">律师：</label>
                <div class="col-sm-8">
                    <select name="lawyerId" class="form-control m-b" th:with="lawyerList=${lawyerList}">
                        <option th:each="lawyer : ${lawyerList}" th:text="${lawyer.userName}" th:value="${lawyer.userId}" th:field="*{lawyerId}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付金额：</label>
                <div class="col-sm-8">
                    <input name="payAmount" th:field="*{payAmount}" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('pay_status')}">
                        <input type="radio" th:id="${'payStatus_' + dict.dictCode}" name="payStatus" th:value="${dict.dictValue}" th:field="*{payStatus}">
                        <label th:for="${'payStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="payTime" th:value="${#dates.format(crServiceApplicationRecord.payTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否在服务有效期内：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('business_whether')}">
                        <input type="radio" th:id="${'serviceValidityStatus_' + dict.dictCode}" name="serviceValidityStatus" th:value="${dict.dictValue}" th:field="*{serviceValidityStatus}">
                        <label th:for="${'serviceValidityStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "business/apply";
        $("#form-apply-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-apply-edit').serialize());
            }
        }

        $("input[name='payTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>